# Terms

The purpose of this document is to explain how different terms relate to each
other and how they relate to concepts in the MLS spec.  These terms stray from
their usage in the "Better Chat Protocol" article.

## Hierarchy

Groups borrow the term "group" from MLS terminology.  This refers to an ongoing
e2ee encryption session.  There's additional context we store along with
attaching additional data to messages to contextualize them with the larger
protocol.  Another part of this context is how messages within the group should
be interpreted (ie. is this a single channel or a multiplex channel?).

Part of the additional context is a toplevel container type.  Spaces are meant
to be more public but with secure compartmentalization.  There's also more fine
grained access control.  Users can have more selective access to certain
channels within a guild.  These would be their own encryption domains with their
own MLS groups and message queues so as to avoid leaking metadata to users in
more-public domains.  Multiple channels' activity can be multiplexed through
these groups to minimize the overhead of having many MLS groups.

Rooms are the more conventional smaller e2ee sessions.  These will also be implemented first.

## Diagram

This is just an example for illustration purposes.  Uppercase terms get exposed
to users, lowercase ones are internal and not directly exposed, only indirectly,
if at all.

```
* Space (large group of users, multiple MLS groups, each with variable channels)
  * registry (storing channel topology, permissions, etc.)
  * Channel (default, transparent)
  * group (multi channel)
    * Channel
    * Channel
  * group (multi channel)
    * Channel
    * Channel

* Room (small group of users, one MLS group, single channel)
  * group (single channel)
    * Channel
```
